package com.fingard.dsp.bank.reqrespobj.elecbillquery;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RetAtsBase;
import com.fingard.dsp.bank.reqrespobj.elecbillquery.detail.RetAtsB005BillBackQryDetail;
import com.fingard.xml.XmlTextWriter;

/**
 * Created by dell on 2017/10/1.
 */
public class RetAtsB005BillBackQry extends RetAtsBase {
    public RetAtsB005BillBackQry(ReqRespHeader p_header) {
        retHeader = p_header;
        retXmlWriter = new XmlTextWriter();//用于输出返回ATS的XML报文
    }

    public void writeBeforeDetail() {
        writeStart();
    }

    public void writeAfter() {
        writeEnd();
    }

    private boolean writtenBefore = false;

    public void writeDetail(RetAtsB005BillBackQryDetail DB005Resp) {
        retXmlWriter.writeStartElement("DetailRecord");
        retXmlWriter.writeElementString("RespCode", DB005Resp.respCode);
        retXmlWriter.writeElementString("RespInfo", DB005Resp.respInfo);
        retXmlWriter.writeElementString("BillNo", DB005Resp.billNo);
        retXmlWriter.writeElementString("TransCode", DB005Resp.transCode);
        retXmlWriter.writeElementString("ApplyName", DB005Resp.applyName);
        retXmlWriter.writeElementString("ReceName", DB005Resp.receName);
        retXmlWriter.writeElementString("ApplyDate", DB005Resp.applyDate);
        retXmlWriter.writeElementString("RespDate", DB005Resp.respDate);
        retXmlWriter.writeElementString("TransFlag", DB005Resp.transFlag);
        retXmlWriter.writeElementString("GuarAddr", DB005Resp.guarAddr);
        retXmlWriter.writeElementString("RepOpenDate", DB005Resp.repOpenDate);
        retXmlWriter.writeElementString("RepDueDate", DB005Resp.repDueDate);
        retXmlWriter.writeElementString("RespFlag", DB005Resp.respFlag);
        retXmlWriter.writeElementString("UnPayCode", DB005Resp.unPayCode);
        retXmlWriter.writeElementString("RecourseType", DB005Resp.recourseType);
        retXmlWriter.writeElementString("UnPayMemo",DB005Resp.unPayMemo);
        retXmlWriter.writeEndElement();
    }
}
